package com.google.code.nexttraffic.web.model;

import java.util.List;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.google.code.nexttraffic.web.model.base.BaseObject;

public class Terminal_Temp  extends BaseObject{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer startTerminal;

	private Integer endTerminal;

	private String linkTerminal;

	private String linkTimetable;

	private String timetable;

	private String divsion;

	private String distance;

	private String totalTime;

	private List<Terminal> terminals;

	private List<String> timetables;

	private List<String> passterminals;

	public Integer getStartTerminal() {
		return startTerminal;
	}

	public void setStartTerminal(Integer startTerminal) {
		this.startTerminal = startTerminal;
	}

	public Integer getEndTerminal() {
		return endTerminal;
	}

	public void setEndTerminal(Integer endTerminal) {
		this.endTerminal = endTerminal;
	}

	public String getLinkTerminal() {
		return linkTerminal;
	}

	public void setLinkTerminal(String linkTerminal) {
		this.linkTerminal = linkTerminal;
	}

	public String getLinkTimetable() {
		return linkTimetable;
	}

	public void setLinkTimetable(String linkTimetable) {
		this.linkTimetable = linkTimetable;
	}

	public String getDivsion() {
		return divsion;
	}

	public void setDivsion(String divsion) {
		this.divsion = divsion;
	}

	public String getDistance() {
		return distance;
	}

	public void setDistance(String distance) {
		this.distance = distance;
	}

	public String getTotalTime() {
		return totalTime;
	}

	public void setTotalTime(String totalTime) {
		this.totalTime = totalTime;
	}

	public List<Terminal> getTerminals() {
		return terminals;
	}

	public void setTerminals(List<Terminal> terminals) {
		this.terminals = terminals;
	}

	public String getTimetable() {
		return timetable;
	}

	public void setTimetable(String timetable) {
		this.timetable = timetable;
	}

	public List<String> getTimetables() {
		return timetables;
	}

	public void setTimetables(List<String> timetables) {
		this.timetables = timetables;
	}

	public List<String> getPassterminals() {
		return passterminals;
	}

	public void setPassterminals(List<String> passterminals) {
		this.passterminals = passterminals;
	}
	
	@Override
	public boolean equals(Object o) {

		if (o instanceof Terminal == false) {
			return false;
		}

		if (this == o) {
			return true;
		}

		Terminal_Temp rhs = (Terminal_Temp) o;

		EqualsBuilder equb = new EqualsBuilder();
		equb.append(startTerminal, rhs.getStartTerminal());
		equb.append(endTerminal, rhs.getEndTerminal());

		return equb.isEquals();
	}

	@Override
	public int hashCode() {

		HashCodeBuilder hashcode = new HashCodeBuilder(3, 37);
		hashcode.append(startTerminal);
		hashcode.append(endTerminal);

		return hashcode.toHashCode();
	}

	@Override
	public String toString() {

		ToStringBuilder tob = new ToStringBuilder(this,
				ToStringStyle.MULTI_LINE_STYLE);

		tob.append("startTerminal", startTerminal);
		tob.append("endTerminal", endTerminal);
		tob.append("linkTerminal", linkTerminal);
		tob.append("linkTimetable", linkTimetable);
		tob.append("timetable", timetable);
		tob.append("divsion", divsion);
		tob.append("distance", distance);
		tob.append("totalTime", totalTime);

		return tob.toString();

	}

}
